> < ^ Date: Fri, 28 Aug 1992 10:20:46 +0200
> < ^ From: Martin Schoenert <martin.schoenert@math.rwth-aachen.de >
< ^ Subject: Re: [panic 'SyGetmem' detected corrupted heap]

In his e-mail message of 28-Aug-92 Geoffrey Mess writes

I would appreciate information on this error message:

gap: panic 'SyGetmem' detected corrupted heap!

This occurred while computing the core of an index 81 subgroup in a
finitely presented finite group. I hope the next edition of the
manual will have "panic" in the index.

What happens is the following. GAP begins with a certain amount of
main memory (e.g., 2 Megabytes). This memory is usually allocated
with the UNIX system call 'sbrk'. So the memory looks as follows.

+--------------------------------+
| GAP Workspace                  |
+--------------------------------+

Now GAP works for a while. Some operations (probably reading files of
the library) causes GAP to call a C library function (which is linked
into the GAP kernel) that also needs some memory. This memory is
allocated with the C library function 'malloc', which in turn also calls
'sbrk'. So now the memory looks as follows.

+--------------------------------+----------------+
| GAP Workspace                  | 'malloc' Arena |
+--------------------------------+----------------+

Then GAP needs more memory to continue with whatever it is doing. To get
more memory it tries to extend the workspace with 'sbrk'. Now GAP
notices that it cannot extend the workspace, because the memory adjacent
to the workspace is already used. GAP reacts with the (not very
desriptive error message)

gap: panic 'syGetmem' detected corrupted heap!

The solution (well at least a workaround) is quite simple. Start GAP
with more memory (using the '-m' option). To see how much memory GAP is
needing you can use the '-g' option.

One thing is strange. I understood that you were working on a NeXT. I
thought the problem could not happen on the NeXT (because 'sbrk' is not
used on the NeXT). I will check with the Frank, who did the NeXT port,
when he returns from his holidays.

Martin.

--
Martin Sch"onert, Martin.Schoenert@Math.RWTH-Aachen.DE, +49 241 804551
Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany


> < [top]